import React from 'react';
import {View, ViewStyle} from 'react-native';
import {useTranslation} from 'react-i18next';
import {Text} from 'react-native';
import { useAppTheme } from 'tsun-smart-ui';
import Nodata from '@/assets/icon/nodata.svg';
interface EmptyContentProps {
  icon?: string;
  title?: string;
  description?: string;
  style?: ViewStyle;
}

const EmptyContent: React.FC<EmptyContentProps> = ({
  title,
  description,
  style,
}) => {
  const {t} = useTranslation();
  const theme = useAppTheme();
  return (
    <View className="flex-1 flex-center p-6" style={style}>
      <Nodata width={45} height={48} />
      <Text
        className="my-3 text-center"
        style={{
          color: theme.colors?.neutral?.tip,
        }}>
        {title ?? t('workplace.record.nodata')}
      </Text>
      {description && (
        <Text
          className=" text-center"
          style={{
            color: theme.colors?.neutral?.tip,
          }}>
          {description}
        </Text>
      )}
    </View>
  );
};

export default EmptyContent;
